
import java.util.Scanner;

public class HomeWork06 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[][] s = new int[5][4];
        for(int i=0; i<5;++i){
            for(int j=0; j<4;++j){
                s[i][j] = scanner.nextInt();
            }
        }
        for (int i = 1; i <= 5; ++i) {
            int sum = 0;
            double ave = 0;
            sum = s[i - 1][0] + s[i - 1][1] + s[i - 1][2] + s[i - 1][3];
            ave = (int) 1.0 * sum / 4;
            System.out.printf("student %d:sum=%d,ave=%.1f\n", i, sum, ave);
        }
        for (int i = 1; i <= 4; ++i) {
            int sum = 0;
            double ave = 0;
            sum = s[0][i - 1] + s[1][i - 1] + s[2][i - 1] + s[3][i - 1] + s[4][i - 1];
            ave = (int) 1.0 * sum / 5;
            System.out.printf("course %d:ave=%.1f\n", i, ave);
        }
    }
}
